package pers.chao.cacheable.infrastructure;

/**
 * Description: 异常信息描述模板
 *
 * @author W.Chao
 * @date 2020/12/8 23:49
 **/
public final class ErrorDesc {
	// 结构工厂，参数异常错误
	public static final String CACHE_PROCESSOR_FACTORY_ERROR = "Cache processor factory exception, maybe redis type error or annotation is error, parameters: {}, {} ,{}";
	public static final String PARAMETERS_COUNT_ERROR = "Parameters count error, parameters: {}";

	// 结构处理异常
	public static final String BITMAP_POS_ERROR = "BITMAP 's pos is out of bounds, @CacheBitmap current has been support natural index(for example 1,2,3), error pos: {}";
	public static final String LIST_TRIM_INDEX_ERROR = "LIST trim only using 2 parameters, annotation trim field can hold great two parameters, trim index: {}";
	public static final String MAP_EVICT_ERROR = "MAP evict or update item only choose between the two.";
	public static final String MAP_KEY_TYPE_ERROR = "MAP item's key only support String. Input type: {}";
	public static final String ZSET_ITEM_TYPE_ERROR = "ZSET only caching Map<String, Double> value. Input type: {}";

	// AOP异常
	public static final String ANNOTATION_USING_ERROR = "Combining @Cache and @CacheXXX annotation. @Cache must be used. If @CacheXXX greater than one, code will get First satisfactory annotation, but selected maybe not expired. If @CacheXXX less than one, maybe is null and NullException";
}
